<?php

use Illuminate\Routing\Router;


Admin::routes();

Route::group([
    'prefix' => config('admin.route.prefix'),
    'namespace' => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
    'as' => config('admin.route.prefix') . '.',
], function (Router $router) {
    // 公益库
    $router->resource('/benefit', BenefitController::class);
    $router->get('/', function (){
        return  Redirect::to('admin/benefit');
    });
});
Route::group([
    'namespace' => 'App\Http\Controllers',
    'prefix' => 'index'
], function ($api) {
    $api->get('getChild', 'HomeController@getChild');
});

